package com.gla.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.io.Serializable;
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)//不显示空字段
@Data
public class UserVO implements Serializable {

    private int id;
    private String account;
    private String name;
    private String password;
    private String photo;
    private int is_vip;
    private String token;

    public UserVO(User user){
        this.id = user.getId();
        this.account = user.getAccount();
        this.name = user.getName();
        this.password = user.getPassword();
        this.photo = user.getPhoto();
        this.is_vip = user.getIs_vip();
    }
    public UserVO(){

    }
}